#include "labelnamelistwidget.h"
#include <QWidget>
#include <QVBoxLayout>
#include <QLabel>
#include <QListWidget>
LabelNameListWidget::LabelNameListWidget(QWidget *parent)
    : QWidget{parent}
{
    QVBoxLayout *layout = new QVBoxLayout(this);

    // 标题
    QLabel *titleLabel = new QLabel("Label Name List", this);
    layout->addWidget(titleLabel);

    // 列表
    list = new QListWidget(this);
    for (int i = 0; i < 5; ++i) {
        QListWidgetItem *item = new QListWidgetItem(QString("Item %1").arg(i + 1), list);
        list->addItem(item);
    }
    layout->addWidget(list);
}
